﻿using System.ComponentModel.DataAnnotations.Schema;

namespace HDW_Migrate.Db.Entities;

/// <summary>
/// 报告
/// </summary>
public class Report : BaseEntity
{
    /// <summary>
    /// 阳性率(true:阳性)
    /// </summary>
    public bool? IsPositive { get; set; }
    /// <summary>
    /// 是否打印(已废弃，使用IsReportPrinted或者IsImagePrinted)
    /// </summary>
    public bool IsPrint { get; set; }
    /// <summary>
    /// 报告内容
    /// </summary>
    public string Content { get; set; }
    /// <summary>
    /// 胶片是否打印
    /// </summary>
    public bool IsImagePrinted { get; set; }
    /// <summary>
    /// 胶片已打印数量
    /// </summary>
    public int ImagePrintedCount { get; set; }
    /// <summary>
    /// 报告是否打印
    /// </summary>
    public bool IsReportPrinted { get; set; }
    /// <summary>
    /// 报告内容与上次修改对比
    /// </summary>
    public string TemporaryContent { get; set; }
    /// <summary>
    /// 备注
    /// </summary>
    public string Comments { get; set; }
    /// <summary>
    /// 状态
    /// </summary>
    public string Status { get; set; }
    /// <summary>
    /// 是否锁定(已废弃，使用Order表相关字段)
    /// </summary>
    public bool IsLock { get; set; }
    /// <summary>
    /// Icd编码(暂未使用)
    /// </summary>
    public string ICDCode { get; set; }
    /// <summary>
    /// ACR编码(暂未使用)
    /// </summary>
    public string ACRCode { get; set; }
    /// <summary>
    /// 关键字
    /// </summary>
    public string KeyWords { get; set; }
    /// <summary>
    /// 提交时间
    /// </summary>
    public DateTime? SubmitDateTime { get; set; }
    /// <summary>
    /// 最后更新时间
    /// </summary>
    public DateTime? LastUpdateTime { get; set; }
    /// <summary>
    /// 审核时间
    /// </summary>
    public DateTime? ApproveDatetime { get; set; }
    /// <summary>
    /// 检查所见
    /// </summary>
    public string Findings { get; set; }
    /// <summary>
    /// 检查印象
    /// </summary>
    public string Impression { get; set; }
    /// <summary>
    /// 技术参数
    /// </summary>
    public string TechParams { get; set; }
    /// <summary>
    /// 锁定人Id(已废弃，使用Order表相关字段)
    /// </summary>
    public Guid? LockerId { get; set; }
    /// <summary>
    /// 创建人
    /// </summary>
    public Guid? CreaterId { get; set; }
    /// <summary>
    /// 报告工作流信息Id(已废弃)
    /// </summary>
    public Guid? ReportWorkFlowInfoId { get; set; }
    /// <summary>
    /// 申请单Id
    /// </summary>
    public Guid? OrderId { get; set; }
    /// <summary>
    /// 患者Id
    /// </summary>
    public Guid? PatientId { get; set; }
    /// <summary>
    /// 就诊信息Id
    /// </summary>
    public Guid? VisitId { get; set; }
    /// <summary>
    /// 报告分类Id(已废弃)
    /// </summary>
    public Guid? ReportCatalogId { get; set; }
    /// <summary>
    /// 报告模版Id
    /// </summary>
    public Guid? ReportModalityTemplateId { get; set; }
    /// <summary>
    /// 是否需要随访
    /// </summary>
    public bool NeedFollowUp { get; set; }
    /// <summary>
    /// 符合/不符合
    /// </summary>
    public string Accord { get; set; }
    /// <summary>
    /// 摄片评级
    /// </summary>
    public string FilmingRank { get; set; }
    /// <summary>
    /// 随访
    /// </summary>
    public string Track { get; set; }
    /// <summary>
    /// 讨论区
    /// </summary>
    public string Forum { get; set; }
    /// <summary>
    /// 退回原因
    /// </summary>
    public string DenyReasons { get; set; }
    /// <summary>
    /// 快照文件路径（PDF或其他格式文件)
    /// </summary>
    public string SnapshotFilePath { get; set; }
    /// <summary>
    /// 危急值
    /// </summary>
    public bool? IsCritical { get; set; }
    /// <summary>
    /// 读片人
    /// </summary>
    public Guid? ImageReaderId { get; set; }
    /// <summary>
    /// 传染病
    /// </summary>
    public Guid? ContagionId { get; set; }
    /// <summary>
    /// 麻醉师
    /// </summary>
    public Guid? AnaesthetistId { get; set; }
    /// <summary>
    /// 打字员
    /// </summary>
    public Guid? TypistId { get; set; }
    /// <summary>
    /// 带教人员名称
    /// </summary>
    public string TraineeDoctor { get; set; }
    /// <summary>
    /// 是否与临床诊断相符合
    /// 0：未选择，1：不符合，2：基本符合，3：符合
    /// </summary>
    public int Consistency { get; set; }
    /// <summary>
    /// 审核人
    /// </summary>
    public Guid? ApproveEvent_Id { get; set; }
    /// <summary>
    /// 打印人
    /// </summary>
    public Guid? PrintEvent_Id { get; set; }
    /// <summary>
    /// 提交人
    /// </summary>
    public Guid? SubmitEvent_Id { get; set; }
    /// <summary>
    /// 发布人
    /// </summary>
    public Guid? PublishEvent_Id { get; set; }
}
/// <summary>
/// 报告流程信息(暂未使用)
/// </summary>
public class ReportWorkFlowInfo : BaseEntity
{
    /// 报告状态流转历史记录XML
    /// XML记录格式根据ReportWFXML对象来确定
    public string ReportWFXml { get; private set; }
}
/// <summary>
/// 报告操作事件
/// </summary>
public class ReportEvent : BaseEntity
{
    /// <summary>
    /// 操作人Id
    /// </summary>
    public Guid OperatorId { get; set; }
    /// <summary>
    /// 操作名称
    /// </summary>
    public string OperateName { get; set; }
    /// <summary>
    /// 操作时间
    /// </summary>
    public DateTime Time { get; set; }
}
/// <summary>
/// 报告附件
/// </summary>
public class ReportAttachment : BaseEntity
{
    /// <summary>
    /// 文件路径
    /// </summary>
    public string PathWithoutFileName { get; set; }
    /// <summary>
    /// 文件名
    /// </summary>
    public string FileName { get; set; }
    /// <summary>
    /// 报告Id
    /// </summary>
    public Guid ReportId { get; set; }
    /// <summary>
    /// 资源类型 语音报告 ReportAudio=1 ref to enum ResourceType
    /// </summary>
    public string ResourceType { get; set; }
    /// <summary>
    /// 创建时间
    /// </summary>
    public DateTime DateCreate { get; set; }
    /// <summary>
    /// 创建者
    /// </summary>
    public Guid CreateUserId { get; set; }
}
/// <summary>
/// 传染病
/// </summary>
public class ContagionDict : BaseEntity
{
    /// <summary>
    /// 名称
    /// </summary>
    public string Name { get; set; }
    /// <summary>
    /// 描述
    /// </summary>
    public string Description { get; set; }
    /// <summary>
    /// 助记码
    /// </summary>
    public string MnemonicCode { get; set; }
    /// <summary>
    /// 最后更新时间
    /// </summary>
    public DateTime LastUpdateDateTime { get; set; }
}
